﻿using System;
using Transformable_Engine_v2.Engine.Graphics;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Super_Management_Mayhem.Content.Spritesheet
{
    public class ParticleSheet : SpriteSheetInstance
    {
        private static SpriteSheetInstance _instance;
        public static void LoadContent()
        {
            _instance = new ParticleSheet();
        }
        public new static Sprite GetSprite(Enum textureName)
        {
            return _instance.GetSprite(textureName);
        }

        public enum Explosion
        {
            SmokeInside,
            SmokeOutside,
        }

        public enum Smoke
        {
            Smoke
        }

        public enum RandomObjectShards
        {
            Shard0,
            Shard1,
            Shard2,
            Shard3,
            Shard4,
            Shard5,
            Shard6
        }

        public enum ChangeClassSmoke
        {
            Smoke0,
            Smoke1,
            Smoke2,
            Smoke3,
            Smoke4,
            Smoke5,
            Hidden
        }

        public enum TorchFire
        {
            FireSpark,
            FireSmoke0,
            FireSmoke1,
            FireSmoke2,
            FireSmoke3
        }

        public override string SpriteSheetPath
        {
            get
            {
                return "Content/Images/Particles.png";
            }
        }

        protected override void LoadSprites()
        {
            AddSprite(Explosion.SmokeInside, new TE_Rectangle(0, 0, 1, 1));
            AddSprite(Explosion.SmokeOutside, new TE_Rectangle(1, 0, 1, 1));
            AddSprite(Smoke.Smoke, new TE_Rectangle(2, 0, 1, 1));

            AddEnumList<RandomObjectShards>(RandomObjectShards.Shard0, RandomObjectShards.Shard6, new TE_Rectangle(0, 1, 1, 1));

            AddEnumList<ChangeClassSmoke>(ChangeClassSmoke.Smoke0, ChangeClassSmoke.Smoke5, new TE_Rectangle(0, 3, 2, 2));
            AddSprite(ChangeClassSmoke.Hidden, TE_Rectangle.Zero);

            AddSprite(TorchFire.FireSpark, new TE_Rectangle(0, 2, 0.25f, 0.25f));
            AddEnumList<TorchFire>(TorchFire.FireSmoke0, TorchFire.FireSmoke3, new TE_Rectangle(0.25f, 2, 0.5f, 0.5f));
        }
    }
}